package com.dlc.shop.systemtest.data.amount;

import com.dlc.shop.bean.param.OrderRefundParam;
import com.dlc.shop.systemtest.api.amount.AddrApi;

/**
 * @author xxw
 * @date 2023/2/27 11:53
 */
public class ShopOrderRefundData {
    /**
     * 商家同意退货退款
     */
    public static OrderRefundParam getShopOrderRefundParam(String  refundSn, Long refundId){
        OrderRefundParam orderRefundParam = new OrderRefundParam();
        if (AddrApi.refundAddrList().isEmpty()){
            AddrApi.addRefundAddr(AddrData.getRefundAddr());
        }
        Long refundAddrId = AddrApi.refundAddrList().get(0).getRefundAddrId();
        orderRefundParam.setRefundAddrId(refundAddrId);
        orderRefundParam.setRefundId(refundId);
        orderRefundParam.setRefundSn(refundSn);
        orderRefundParam.setIsReceiver(true);
        orderRefundParam.setRefundSts(2);
        return orderRefundParam;
    }
    /**
     * 商家拒绝退款
     */
    public static OrderRefundParam getShopRejectOrderRefundParam(String refundSn, Long redundId){
        OrderRefundParam orderRefundParam = new OrderRefundParam();
        orderRefundParam.setRefundId(redundId);
        orderRefundParam.setRefundSn(refundSn);
        orderRefundParam.setRefundSts(3);
        orderRefundParam.setRejectMessage("拒绝原因");
        orderRefundParam.setIsReceiver(true);
        return  orderRefundParam;
    }

}
